/* 库存调拨组件样式 */
.table {
  width: 100%;
}

.table th {
  font-weight: 600;
}

.table td, .table th {
  vertical-align: middle;
}

/* 分页样式 */
.pagination-info {
  font-size: 0.85rem;
  color: #6c757d;
  line-height: 31px;
}

.page-item .page-link {
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
}

.form-select-sm {
  font-size: 0.85rem;
  padding: 0.25rem 2rem 0.25rem 0.5rem;
}

/* 模态框样式 */
.modal-backdrop {
  z-index: 1040;
}

.modal {
  z-index: 1050;
}

.modal.show {
  display: block;
}

/* 状态徽章样式 */
.badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

/* 复选框样式 */
input[type="checkbox"] {
  cursor: pointer;
}

/* 按钮组样式 */
.btn-group .dropdown-toggle::after {
  margin-left: 0.5rem;
}

/* 表格响应式 */
@media (max-width: 768px) {
  .table-responsive {
    font-size: 0.875rem;
  }
  
  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
}

:host {
  // 现代亮蓝风格美化
  $primary: #3b82f6; // 亮蓝
  $primary-hover: #2563eb;
  $success: #22c55e;
  $danger: #ef4444;
  $gray-bg: #f8fafc;
  $border: #e5e7eb;
  $text: #22223b;
  $muted: #94a3b8;

  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  background: $gray-bg;
  color: $text;

  // 基础卡片样式（适用于主页和弹窗内的卡片）
  .card {
    border-radius: 1.2rem;
    box-shadow: 0 4px 24px 0 rgba(59,130,246,0.08);
    border: none;
    background: #fff;
    margin-bottom: 2.5rem;
    padding: 0.5rem 0;
  }

  .card-header {
    background: $gray-bg;
    border-bottom: 1.5px solid $border;
    font-weight: 600;
    font-size: 1.18rem;
    color: $primary;
    padding: 1.3rem 2rem 1rem 2rem;
    letter-spacing: 0.01em;
  }

  .card-body {
    padding: 2rem 2rem 1.5rem 2rem;
  }
  
  .card-footer {
    background: $gray-bg;
    border-top: 1.5px solid $border;
    padding: 1.1rem 2rem;
  }

  // 弹窗（Modal）优化
  .modal-dialog {
    &.modal-lg {
      max-width: 80vw; // 让弹窗更宽，方便操作
    }
  }

  .modal-content {
    border-radius: 1.5rem;
    box-shadow: 0 12px 48px 0 rgba(59,130,246,0.13);
    border: none;
  }

  .modal-header {
    border-bottom: none;
    background: $gray-bg;
    border-radius: 1.5rem 1.5rem 0 0;
  }
  
  .modal-body {
    background-color: $gray-bg;
    padding: 1.5rem;
  }

  // 表单元素美化
  .form-label {
    font-weight: 500;
    color: $text;
    margin-bottom: 0.5rem;
    font-size: 1.02rem;
    letter-spacing: 0.01em;
  }

  .form-group {
    margin-bottom: 1.3rem;
  }

  .form-control, .form-select {
    border-radius: 1.2rem;
    border: 1.5px solid $border;
    font-size: 1.05rem;
    padding: 0.7rem 1.1rem;
    background: #f1f5f9;
    transition: border-color 0.2s, box-shadow 0.2s;
    &:focus {
      border-color: $primary;
      box-shadow: 0 0 0 3px rgba(59,130,246,0.13);
      background: #fff;
    }
  }
  
  input[readonly] {
    background: #f3f4f6;
    color: $muted;
  }

  // 按钮样式
  .btn {
    border-radius: 1.2rem;
    font-weight: 600;
    padding: 0.7rem 1.5rem;
    font-size: 1.05rem;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    box-shadow: 0 2px 8px 0 rgba(59,130,246,0.07);
    border: none;
    &:hover:not(:disabled) {
      transform: scale(1.04);
      box-shadow: 0 4px 16px 0 rgba(59,130,246,0.13);
    }
    &:disabled {
      background: #e5e7eb !important;
      color: #b0b3b8 !important;
      border: none !important;
      cursor: not-allowed;
    }
  }

  .btn-primary {
    background: $primary;
    color: #fff;
    &:hover, &:focus {
      background: $primary-hover;
    }
  }

  .btn-secondary {
    background: #fff;
    color: $primary;
    border: 1.5px solid $primary;
    &:hover, &:focus {
      background: $gray-bg;
    }
  }
  
  .btn-success {
    background: $success;
    color: #fff;
    &:hover, &:focus {
      background: darken($success, 8%);
    }
  }

  .btn-danger {
    background: $danger;
    color: #fff;
    &:hover, &:focus {
      background: darken($danger, 8%);
    }
  }

  // 表格样式增强
  .table {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 0;
    th, td {
      vertical-align: middle;
      border-color: $border;
      font-size: 1.03rem;
      padding: 1rem 0.7rem;
    }
    th {
      background: #e0e7ff;
      color: $primary;
      font-weight: 700;
      letter-spacing: 0.01em;
      border-bottom: 2px solid $primary;
      font-size: 1.05rem;
    }
    tbody tr {
      transition: background 0.2s;
      &:hover {
        background: rgba(59,130,246,0.08);
      }
    }
    tfoot tr {
      background: #dbeafe;
      color: $primary;
      font-size: 1.10rem;
      font-weight: 700;
    }
    td {
      border-bottom: 1.5px solid $border;
    }
  }

  // 分页样式
  .pagination .page-link {
    border-radius: 0.4rem;
    color: $primary;
    border: 1px solid $border;
    margin: 0 2px;
    &:hover {
      background: $primary;
      color: #fff;
    }
  }

  .pagination .active .page-link {
    background: $primary;
    color: #fff;
    border-color: $primary;
  }

  // 复选框样式
  input[type="checkbox"] {
    accent-color: $primary;
    width: 1.2rem;
    height: 1.2rem;
  }

  // 弹窗美化
  .modal-footer {
    border-top: none;
    background: $gray-bg;
    border-radius: 0 0 1.5rem 1.5rem;
  }

  // 响应式优化
  @media (max-width: 900px) {
    .card-body, .card-header, .card-footer {
      padding: 1rem !important;
    }
    .form-group {
      margin-bottom: 1rem;
    }
    .table th, .table td {
      font-size: 0.98rem;
      padding: 0.6rem 0.3rem;
    }
  }

  // 细节优化
  .text-muted {
    color: $muted !important;
  }

  // 合计行突出
  .table tfoot tr {
    background: #dbeafe;
    color: $primary;
    font-size: 1.05rem;
  }

  // 让按钮组更紧凑
  .btn-group .btn {
    margin-right: 0.25rem;
  }

  // 让表格更有呼吸感
  .table-responsive {
    margin-bottom: 1.5rem;
  }
} 